package com.itstyle.seckill.topic.desinger.design_xw.strategy;

/**
 * @Auther: liuwenxiang
 * @Date: 2019/9/18 20:47
 * @Description:
 */
public class Test {

    public static void main(String[] args) {
        Context context =new Context();
        //调用策略1
        Strategy1 strategy1 =new Strategy1();
        context.setStrategy(strategy1);
        context.strategyMethod();

        //调用策略2
        Strategy2 strategy2 =new Strategy2();
        context.setStrategy(strategy2);
        context.strategyMethod();

    }
}
